<?php

namespace app\api\controller;

use app\api\service\UploadService;
use app\common\controller\Api;
use fast\Random;
use think\Config;

class Upload extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /**
     * 上传文件
     */
    public function upload()
    {
        $returnData = UploadService::getInstance()->upload();
        if ($returnData['status'])
        {
            $this->success('Upload SuccessFull', $returnData['returnData']);
        }else{
            $this->error($returnData['returnData']);
        }
    }
}